home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{880C334D-0D3E-11D2-A3D9-EDF746011E28}#1.0#0"; "DIGIPAK1.OCX"
- Begin VB.Form frmMain
- BorderStyle = 3 'Fixed Dialog
- Caption = "Clock example using DigiPAK1"
- ClientHeight = 855
- ClientLeft = 4545
- ClientTop = 3555
- ClientWidth = 3735
- ClipControls = 0 'False
- ControlBox = 0 'False
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 855
- ScaleWidth = 3735
- Begin VB.CommandButton Command1
- Caption = "&Close"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 2880
- TabIndex = 3
- Top = 120
- Width = 735
- End
- Begin VB.Timer Timer1
- Interval = 250
- Left = 2280
- Top = 120
- End
- Begin DigiPAK1.DigiLED DigiLED6
- Height = 480
- Left = 1800
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- SegmentsColor = 192
- End
- Begin DigiPAK1.DigiLED DigiLED5
- Height = 480
- Left = 1560
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- SegmentsColor = 192
- End
- Begin DigiPAK1.DigiLED DigiLED4
- Height = 480
- Left = 1080
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- SegmentsColor = 12632064
- End
- Begin DigiPAK1.DigiLED DigiLED3
- Height = 480
- Left = 840
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- SegmentsColor = 12632064
- End
- Begin DigiPAK1.DigiLED DigiLED2
- Height = 480
- Left = 360
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- End
- Begin DigiPAK1.DigiLED DigiLED1
- Height = 480
- Left = 120
- Top = 120
- Width = 285
- _ExtentX = 503
- _ExtentY = 847
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Seconds"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 1560
- TabIndex = 2
- Top = 600
- Width = 600
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Minutes"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 840
- TabIndex = 1
- Top = 600
- Width = 555
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Hours"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 420
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Call Timer1_Timer
- End Sub
- Private Sub Timer1_Timer()
- Dim hora As String
- hora = Format(Now, "hh:mm:ss")
-
- DigiLED1.Value = Mid(hora, 1, 1)
- DigiLED2.Value = Mid(hora, 2, 1)
- DigiLED3.Value = Mid(hora, 4, 1)
- DigiLED4.Value = Mid(hora, 5, 1)
- DigiLED5.Value = Mid(hora, 7, 1)
- DigiLED6.Value = Mid(hora, 8, 1)
- End Sub
-